import React, {Component} from 'react';
import {StyleSheet, Text, View, Button} from 'react-native';

export default class Error extends Component {
  render() {
    const {error, retry} = this.props;
    return (
      <View style={styles.container}>
        <Text>{error}</Text>
        <Button onPress={retry} title="RETRY" />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    height: '100%',
    alignItems: 'center',
    justifyContent: 'center',
  },
});
